package com.example.concurrent.DelayQueue;

import java.util.concurrent.DelayQueue;
import java.util.concurrent.Delayed;

/**
 * Created by Administrator on 2017/2/10 0010.
 */
public class DelayQueueExample {

    public static void main(String[] args) {

        try {
            DelayQueue queue = new DelayQueue();
            Delayed element1 = new DelayedElement();
            queue.put(element1);
            Delayed element2 = queue.take();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


}
